package javase1.day08.demo02.day09.demo13;

import java.util.ArrayList;

public class DemoRedPacket {
    public static void main(String[] args) {
        Manager manager=new Manager("群主",100);
        Member A=new Member("A",0);
        Member B=new Member("B",0);
        Member C=new Member("C",0);
        manager.show();
        A.show();
        B.show();
        C.show();
        System.out.println("发红包后：");
        ArrayList<Integer> redlist=manager.send(40,3);
        A.receive(redlist);
        B.receive(redlist);
        C.receive(redlist);
        manager.show();
        A.show();
        B.show();
        C.show();
        /*
我叫：群主,我有：100钱
我叫：A,我有：0钱
我叫：B,我有：0钱
我叫：C,我有：0钱
发红包后：
我叫：群主,我有：60钱
我叫：A,我有：14钱
我叫：B,我有：13钱
我叫：C,我有：13钱
         */
    }
}
